Health Cloud Administration System API - Implementation Template
Developer guide
Administration Dev Guide
The US-Core Administratoin application uses the following DataWeave modules to map between Health Cloud and FHIR formats.
| Module | Description |
|---|---|
| PatientFHIRTools | PatientFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| PatientRequest | This module defines functions needed to convert a FHIR Patient resource into it's representation within Health Cloud. |
| LocationFHIRTools | LocationFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| LocationRequest | This module defines functions needed to convert a FHIR Location resource into it's representation within Health Cloud. |
| PractitionerFHIRTools | PractitionerFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| PractitionerRequest | This module defines functions needed to convert a FHIR Practitioner resource into it's representation within Health Cloud. |
| OrganizationFHIRTools | OrganizationFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| OrganizationRequest | This module defines functions needed to convert a FHIR Organization resource into it's representation within Health Cloud. |
| encounterfhirtools | encounterFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| encounterRequest | This module defines functions needed to convert a FHIR Encounter resource into it's representation within Health Cloud. |
| PractitionerRoleFHIRTools | PractitionerRoleFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format. |
| PractitionerRoleRequest | This module defines functions needed to convert a FHIR PractitionerRole resource into it's representation within Health Cloud. |
| RelatedPersonFHIRTools | RelatedPersonFHIRTools dataweave library contains functions used for converting Health Cloud data into FHIR format. |
| RelatedPersonRequest | This module defines functions needed to convert a FHIR RelatedPerson resource into it's representation within Health Cloud. |
| Util | A library with needed dataweave utility functions. |
PatientFHIRTools
PatientFHIRTools DataWeave library contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Patient/PatientFHIRTools.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPatientResponse (acc: Object, idTypeIdList, personNames, contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap, languageCodeSetCodes, generalPractitionerIds, maritalStatusCodeSetCodes)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
parampersonNamesis an optional array of HC PersonName objects to map.
paramcontactAccountsis an optional array of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
paramcontactContactRelationsis a list of contact relation objects.
paramrelationRoleMapthe role relationship map.
paramlanguageCodeSetCodesthe CodeSet lookup
return A FHIR formatted Patient object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | Account | Id | Patient account Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether this patient's record is in active use |
| name.family | PersonName | LastName | Patient last name |
| name.given | PersonName | FirstName | Patient first name |
| name.suffix | PersonName | Suffix | Parts that come after the name |
| name.prefix | PersonName | Prefix | Parts that come before the name |
| gender | Contact | Gender | The gender of the patient |
| birthDate | Contact | Birthdate | The date of birth of the patient |
| deceasedDateTime | Contact | DeceasedDate | Indicates if the individual is deceased or not |
| maritalStatus | Contact | maritalStatus | Marital (civil) status of a patient |
| multipleBirthInteger | Contact | SequenceInMultipleBirth | The number is the birth number in the sequence |
| telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
| telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
| telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
| telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
| telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
| telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
| address.use | ContactPointAddresses | UsageType | The use of an address |
| address.type | ContactPointAddresses | AddressType | The type of an address (physical \ postal) |
| address.line | ContactPointAddresses | Street | Patient's address Line |
| address.city | ContactPointAddresses | City | Patient's address city |
| address.state | ContactPointAddresses | State | Patient's address state |
| address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
| address.country | ContactPointAddresses | Country | Patient's address country |
| communication.language.coding.display | PersonLanguage | Language | Language display |
| contact.name.family | PersonName | LastName | The last name of the contact party for the patient |
| contact.name.given | PersonName | FirstName | The first name of the contact party for the patient |
| contact.name.suffix | PersonName | Suffix | Parts that come after the contact party's name |
| contact.name.prefix | PersonName | Prefix | Parts that come before the contact party's name |
| contact.name.use | PersonName | NameUsageType | The use of a human name. |
| contact.gender | Contact | Gender | The gender of the contact party |
| contact.relationship.coding.code | HealthCloudGA__ContactContactRelation__c | HealthCloudGA__Role__c | The nature of the relationship between a patient and a contact person for that patient. |
| contact.telecom.system | ContactPointEmail | Telecommunications form for contact point. | |
| contact.telecom.value | ContactPointEmail | EmailAddress | Contact party's email address |
| contact.telecom.use | ContactPointEmail | UsageType | The use of an email address |
| contact.telecom.rank | ContactPointEmail | PreferenceRank | Specify preferred order of use |
| contact.telecom.period.start | ContactPointEmail | ActiveFromDate | Starting time with inclusive boundary |
| contact.telecom.period.end | ContactPointEmail | ActiveToDate | End time with inclusive boundary |
| contact.telecom.system | ContactPointPhone | Telecommunications form for contact point. | |
| contact.telecom.value | ContactPointPhone | TelephoneNumber | Contact party's phone number |
| contact.telecom.use | ContactPointPhone | UsageType | Purpose of this contact point |
| contact.telecom.rank | ContactPointPhone | PreferenceRank | Specify preferred order of use |
| contact.telecom.period.start | ContactPointPhone | ActiveFromDate | Starting time with inclusive boundary |
| contact.telecom.period.end | ContactPointPhone | ActiveToDate | End time with inclusive boundary |
| contact.address.use | ContactPointAddress | UsageType | The use of the contact party's address |
| contact.address.line | ContactPointAddress | Street | The type of the contact party's address |
| contact.address.city | ContactPointAddress | City | Contact party's address city |
| contact.address.state | ContactPointAddress | State | Contact party's address state |
| contact.address.postalCode | ContactPointAddress | PostalCode | Contact party's address postal code |
| contact.address.country | ContactPointAddress | Country | Contact party's address country |
| contact.address.type | ContactPointAddress | AddressType | The type of an address |
| us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys1__c | US Core Race Extension |
| us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code1__c | US Core Race Extension |
| us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP1__c | US Core Race Extension |
| us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys2__c | US Core Race Extension |
| us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code2__c | US Core Race Extension |
| us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP2__c | US Core Race Extension |
| us-core-race.extension:ombCategory..system | Contact | Race_Ext_OmbCategory_ValueCoding_Sys3__c | US Core Race Extension |
| us-core-race.extension:ombCategory..code | Contact | Race_Ext_OmbCategory_ValueCoding_Code3__c | US Core Race Extension |
| us-core-race.extension:ombCategory..display | Contact | Race_Ext_OmbCategory_ValueCoding_DP3__c | US Core Race Extension |
| us-core-race.extension:detailed..system | Contact | Race_Ext_Detailed_ValueCoding_Sys1__c | US Core Race Extension |
| us-core-race.extension:detailed..code | Contact | Race_Ext_Detailed_ValueCoding_Code1__c | US Core Race Extension |
| us-core-race.extension:detailed..display | Contact | Race_Ext_Detailed_ValueCoding_DP1__c | US Core Race Extension |
| us-core-race.extension:detailed..system | Contact | Race_Ext_Detailed_ValueCoding_Sys2__c | US Core Race Extension |
| us-core-race.extension:detailed..code | Contact | Race_Ext_Detailed_ValueCoding_Code2__c | US Core Race Extension |
| us-core-race.extension:detailed..display | Contact | Race_Ext_Detailed_ValueCoding_DP2__c | US Core Race Extension |
| us-core-race.extension:text..valueString | Contact | Race_Ext_ValueString__c | US Core Race Extension |
| us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..system | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Sys3__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..code | Contact | Ethnic_Ext_OmbCategory_ValueCoding_Code3__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:ombCategory..display | Contact | Ethnic_Ext_OmbCategory_ValueCoding_DP3__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..system | Contact | Ethnic_Ext_Detailed_ValueCoding_Sys1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..code | Contact | Ethnic_Ext_Detailed_ValueCoding_Code1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..display | Contact | Ethnic_Ext_Detailed_ValueCoding_DP1__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..system | Contact | Ethnic_Ext_Detailed_ValueCoding_Sys2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..code | Contact | Ethnic_Ext_Detailed_ValueCoding_Code2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:detailed..display | Contact | Ethnic_Ext_Detailed_ValueCoding_DP2__c | US Core ethnicity Extension |
| us-core-ethnicity.extension:text..valueString | Contact | Ethnic_Ext_ValueString__c | US Core ethnicity Extension |
| us-core-birthsex.url | Contact | Birthsex_Ext_URL__c | US Core Birth Sex Extension |
| us-core-birthsex.valueCode | Contact | Birthsex_Ext_ValueCode__c | US Core Birth Sex Extension |
| generalPractitioner | ContactContactRelation__c | RelatedContact__c | Patient's nominated primary care provider |
fun getPatientNames (personNames)
Gets the patient names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPatientCommunicationContactPoints (cp)
Gets the patient communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPatientIdentifiers (idTypeIdList, ids)
Gets the patient identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeIdListis a list of HC records to FHIR identifier type codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPatientAddresses (addresses)
Get the patient addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPatientCommunication (personLanguages, languagelookup)
Get the patient preferred language from the provided HC account object and returns an array of FHIR formatted language objects.
param
personLanguagesis a list of Languages to map.
paramlanguagelookupis a list of codeset lookup for Language to map.
return An array of FHIR formatted language objects.
fun getPatientContacts (contactAccounts, contactPersonNames, contactContactRelations, relationRoleMap)
Gets the patient contact-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
paramcontactContactRelationsis a list of contact relation objects.
paramrelationRoleMapthe role relationship map.
return An array of contact FHIR objects.
fun getContactPeriod (contactContactRelations, id)
Gets the contact period object with the provided list of contact relations, the Id of the current account.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A contact period object.
fun getPatientRelationRole (contactContactRelations, id, relationRoleMap)
Gets the patient relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
paramrelationRoleMapthe role relationship map.
return A code for the patient relation role.
fun getPatientRelationRoleRecord (contactContactRelations, id)
Gets the patient relation role record with the provided list of contact relations and the Id.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A Salesforce role Id for the provided data.
fun getPatientUsCoreExtensions (ct)
Gets the us-core Extensions for Patient with the provided Contact object.
param
ctis a Health Cloud Contact object.
return A FHIR formatted extension list.
fun getPatientUsCoreExtensionRace (ct)
Gets the us-core Extension for Patient race with the provided Contact object.
param
ctis a Health Cloud Contact object.
return A FHIR formatted race extension object.
fun getPatientUsCoreExtensionEthnicity (ct)
Gets the us-core Extension for Patient ethnicity with the provided Contact object.
param
ctis a Health Cloud Contact object.
return A FHIR formatted ethnicity extension object.
fun getPatientUsCoreExtensionBirthSex (ct)
Gets the us-core Extension for Patient birth sex with the provided Contact object.
param
ctis a Health Cloud Contact object.
return A FHIR formatted birth sex extension object.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
fun getGeneralPractitioner (contactAccounts, contactContactRelations, relationRoleMap, generalPractitionerIds)
Gets the generalPractitioner object with the provided list of contact relations, the Id of the current account.
param
contactAccountsis a list of contact account objects.
paramcontactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A contact period object.
PatientRequest
This module defines functions needed to convert a
FHIR Patient resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Patient/PatientRequest.dwl
Functions
fun getPatientPersonAccount (fhirObj, recordType)
Converts the provided Patient FHIR object to the Health Cloud PersonAccount request object.
param
fhirObjis a FHIR Patient object.
paramrecordTypeis an ID with the PersonAccount record ID to use.
return A Health Cloud PersonAccount request object.
fun getPatientAccount (fhirObj)
Converts the provided Patient FHIR object to the Health Cloud Account object.
param
fhirObjis a FHIR Patient object.
return A Health Cloud Account object.
fun getPatientContact (fhirObj, upsertLookupResponse)
Converts the provided Patient FHIR object to the Health Cloud Contact object.
param
fhirObjis a FHIR Patient object.
return A Health Cloud Contact object.
fun getPatientPersonName (fhirObj, accountId)
Converts the provided Patient FHIR object to the Health Cloud PersonName object list.
param
fhirObjis a FHIR Patient object.
paramaccountIdis a string with the Account Id.
return A Health Cloud PersonName object list.
fun getPatientContactPoint (telecom, accountId)
Converts the provided Patient FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of Patient telecom objects.
paramaccountIdis a string with the Account Id.
return A Health Cloud ContactPoint object list.
fun getPatientIdentifier (fhirObj, idTypeIdList, accountId)
Converts the provided Patient FHIR object to the Health Cloud Identifier object list.
param
fhirObjis a FHIR Patient object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramaccountIdis a string with the Account Id.
return A Health Cloud Identifier object list.
fun getIdentifierType (identifierObj)
Gets the identifier type. It first looks for the codeable concept code value, and if that's not found it then looks for the text value.
param
identifierObjis an identifier object to get the type for.
return A string with the type or Undefined.
fun getPatientContactPointAddress (fhirObj, accountId)
Converts the provided Patient FHIR object to the Health Cloud ContactPoint Address objectlist .
param
fhirObjis a FHIR Patient object.
paramaccountIdis a string with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getPatientPersonLanguage (fhirObj, upsertLookupResponse)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObjis a FHIR RelatedPerson object.
paramupsertLookupResponseis a FHIR Codeset lookup object.
return A Health Cloud PersonLanguage object list.
fun getPatientPersonLanguage (fhirObj, upsertLookupResponse, accountId)
Converts the provided Patient FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObjis a FHIR Patient object.
paramupsertLookupResponseis a FHIR Codeset lookup object.
paramaccountIdis a string with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getPatientExtensions (fhirObj)
Converts the provided Patient FHIR object and returns the patient ethnicity and race us-core extensions.
param
fhirObjis a FHIR Patient object.
return The Health Cloud ethnicity and race fields for Contact object.
fun getPatientRace (ext)
Converts the provided FHIR Extension object and returns the patient race us-core extensions.
param
extis a us-core-race extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicity (ext)
Converts the provided FHIR Extension object and returns the patient ethnicity us-core extensions.
param
extis a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientBirthSex (ext)
Converts the provided FHIR Extension object and returns the patient birth sex us-core extension.
param
extis a us-core-ethnicity extension object.
return An object with the extension fields for HC Contact.
fun getPatientEthnicityOmbCategory (items)
Converts the provided FHIR Extension list of Ethnicity OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityDetailed (items)
Converts the provided FHIR Extension list of Ethnicity Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientEthnicityText (items)
Converts the provided FHIR Extension list of Ethnicity Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Ethnicity.
return A list of objects with HC Contact fields.
fun getPatientRaceOmbCategory (items)
Converts the provided FHIR Extension list of Race OmbCategory objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceDetailed (items)
Converts the provided FHIR Extension list of Race Detailed objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientRaceText (items)
Converts the provided FHIR Extension list of Race Text objects and returns a list of objects with the us-core extensions for HC Contact.
param
itemsis a list of FHIR Extension objects for Race.
return A list of objects with HC Contact fields.
fun getPatientContactsPersonAccount (method, fhirObj, index, recordType)
Converts the provided Contact FHIR object to the Health Cloud Patient Contact Account request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramindexis a string with the contact reference index to use.
paramrecordTypeis an ID with the PersonAccount record
return A composite Health Cloud contact Account request.
fun getPatientContactsContact (fhirObj, upsertLookupResponse)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts Contact.
param
fhirObjis a FHIR Contact object.
return A composite Health Cloud contact Contact.
fun getPatientContactsPersonName (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts PersonName composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite Health Cloud contact PersonName request.
fun getPatientContactsContactPointTelecom (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts telecom composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite Health Cloud contact telecom request.
fun getPatientContactsContactPointAddress (method, fhirObj, ctIndex, accountId)
Converts the provided Contact FHIR object to the Health Cloud Patient Contacts address composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramctIndexis the index of the contact in the loop.
paramaccountIdis the Id of the parent Account record.
return A composite Health Cloud contact address request.
fun getPatientContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, patientContactContactId, ctIndex)
Converts the provided Contact FHIR object to the Health Cloud Patient contact-to-contact relationship of composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramrelationRoleMapthe role relationship map.
parammainContactIdis a string with the main Contact Id.
paramcontactIdis a string with the Contact Id.
paramctIndexis the index of the contact in the loop.
return A composite Health Cloud contact-to-contact relationship request.
fun getgeneralPractitionerContactsRelationships (method, relationRoleMap, mainContactId, contactId)
Converts the provided Contact FHIR object to the Health Cloud generalPractitioner contact-to-contact relationship of composite request.
param
methodis a string with POST or PATCH.
paramrelationRoleMapthe role relationship map.
parammainContactIdis a string with the main Contact Id.
paramcontactIdis a string with the Contact Id.
return A composite Health Cloud contact-to-contact relationship request.
LocationFHIRTools
LocationFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Location/LocationFHIRTools.dwl
Functions
fun getLocationResponse (loc: Object, locationObj, identifierObj, codeSet, idTypeIdList, parentFacilityAccountId, timeSlotsObject, locationTypeCodeSetObject, Id)
Generates the location response object in FHIR format with the provided location and associated objects queried from Health Cloud.
param
locis the HC Account location object.
paramlocationObjis the HC Location object.
paramidentifierObjis the HC Identifier object list.
paramcodeSetis the HC CodeSet object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramparentFacilityAccountIdis a String with the parent facility Account Id if present or null if not provided.
paramlocationTypeCodeSetObjectis FHIR CodeSet object response.
return A FHIR formatted Location object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | HealthcareFacility | Id | Healthcare Facility Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether this patient's record is in active use |
| name | HealthcareFacility | Name | Name of the location as used by humans |
| description | Location | Description | Additional details about the location that could be displayed as further information to identify the location beyond its name |
| position.longitude | Location | Longitude | Longitude with WGS84 datum |
| position.latitude | Location | Latitude | Latitude with WGS84 datum |
| availabilityExceptions | HealthcareFacility | AvailabilityExceptions | Description of availability exceptions |
| partOf | HealthcareFacility | ParentHealthcareFacilityId | Another Location this one is physically a part of |
| type.coding.code | HealthcareFacility.FacilityTypeId | Code | Type of function performed |
| type.coding.display | HealthcareFacility.FacilityTypeId | CodeDescription | Type of function performed |
| type.coding.system | HealthcareFacility.FacilityTypeId | SourceSystem | Type of function performed |
| physicalType.coding.display | HealthcareFacility | LocationType | |
| telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
| telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
| telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
| telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
| telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
| telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
| address.use | ContactPointAddresses | UsageType | The use of an address |
| address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
| address.line | ContactPointAddresses | Street | Patient's address Line |
| address.city | ContactPointAddresses | City | Patient's address city |
| address.state | ContactPointAddresses | State | Patient's address state |
| address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
| address.country | ContactPointAddresses | Country | Patient's address country |
| managingOrganization | HealthCloudGA__RelatedFromAccounts__r | HealthCloudGA__RelatedAccount__c | Organization responsible for provisioning and upkeep |
| hoursOfOperation.daysOfWeek | TimeSlot | DayOfWeek | The days of the week. |
| hoursOfOperation.openingTime | TimeSlot | StartTime | Time that the Location opens |
| hoursOfOperation.closingTime | TimeSlot | EndTime | Time that the Location closes |
fun getLocationHoursOfOperation (timeSlots)
Gets the HoursOfOperation object with the provided TimeSlots object.
param
timeSlotsis a Health Cloud TimeSlots object.
return A FHIR Location physicalType object.
fun getLocationType (codeSet)
Gets the Location type object with the provided codeSet Health Cloud object.
param
codeSetis a Health Cloud CodeSet object.
return A FHIR Location type object.
fun getLocationPhysicalType (locationTypeCodeSet)
Gets the Location physicalType object with the provided HealthcareFacility Health Cloud object.
param
facilityis a Health Cloud HealthcareFacility object.
return A FHIR Location physicalType object.
fun getLocationIdentifier (idList, idTypeIdList)
Gets the Location identifier object list with the provided Identifier Health Cloud object list.
param
idListis a Health Cloud Identifier object list.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A FHIR Location identifier object.
fun getLoationTelecom (loc: Object)
Gets the Location telecom objects with the provided Location Health Cloud object.
param
locis the HC Account location object.
return A list of FHIR Location telecom objects.
fun getLoationAddress (loc: Object)
Gets the Location address objects with the provided Location Health Cloud object.
param
locis the HC Account location object.
return A list of FHIR Location address objects.
fun getLoationManagingOrganization (loc: Object)
Gets the Location managing organization object with the provided Location Health Cloud object.
param
locis the HC Account location object.
return A FHIR reference to managing organization.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
LocationRequest
This module defines functions needed to convert a
FHIR Location resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Location/LocationRequest.dwl
Functions
fun getLocationAccount (fhirObj, operatingHoursId)
Converts the provided Location FHIR object to the Health Cloud Account object.
param
fhirObjis a FHIR Location object.
return A Health Cloud Account object.
fun getLocationLocation (fhirObj)
Converts the provided Location FHIR object to the Health Cloud Location object.
param
fhirObjis a FHIR Location object. Id or null if not present.
return A Health Cloud Location object.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Location upsert.
param
reqis a FHIR object field.
paramlookupReqis from FHIR_CodeSet__c.
return A value for the picklist field.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, upsertLookupResponse)
Converts the provided Location FHIR object to the Health Cloud HealthcareFacility object.
param
fhirObjis a FHIR Location object.
paramfacilityTypeIdis the Id of the CodeSetBundle to set.
paramparentFacilityIdis a String with the parent HealthcareFacility Id or null if not present.
return A Health Cloud HealthcareFacility object.
fun getLocationHealthcareFacility (fhirObj, facilityTypeId, upsertLookupResponse, create)
Converts the provided Location FHIR object to the Health Cloud HealthcareFacility object.
param
fhirObjis a FHIR Location object.
paramfacilityTypeIdis the Id of the CodeSetBundle to set.
paramcreateis a boolean with true to create and false to update.
paramupsertLookupResponseis lookup of FHIR CodeSets object.
return A Health Cloud HealthcareFacility object.
fun getLocationIdentifier (fhirObj, idTypeIdList)
Converts the provided Location FHIR object to the Health Cloud Identifier object.
param
fhirObjis a FHIR Location object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes. from Health Cloud map.
return A Health Cloud Identifier object.
fun getLocationIdentifier (fhirObj, idTypeIdList, healthcareFacilityId)
Converts the provided Location FHIR object to the Health Cloud Identifier object.
param
fhirObjis a FHIR Location object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramhealthcareFacilityIdis the HealthcareFacility Id to use as the parent record Id.
return A Health Cloud Identifier object.
fun getLocationContactPoint (telecom)
Converts the provided Location FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of Location telecom objects.
return A Health Cloud ContactPoint object list.
fun getLocationContactPoint (telecom, accountId)
Converts the provided Location FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of Location telecom objects.
paramaccountIdis a String with the Account Id.
return A Health Cloud ContactPoint object list.
fun getLocationContactPointAddress (fhirObj)
Converts the provided Location FHIR object to the Health Cloud ContactPoint Address object .
param
fhirObjis a FHIR Location object.
return A Health Cloud ContactPoint Address object.
fun getLocationContactPointAddress (fhirObj, accountId)
Converts the provided Location FHIR object to the Health Cloud ContactPoint Address object .
param
fhirObjis a FHIR Location object.
paramaccountIdis a String with the Account Id.
return A Health Cloud ContactPoint Address object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap)
Converts the provided Location FHIR object to the Health Cloud AccountAccountRelation object .
param
fhirObjis a FHIR Location object.
paramrelationRoleMapthe role relationship map.
return A Health Cloud ContactPoint AccountAccountRelation object.
fun getLocationAccountAccountRelation (fhirObj, relationRoleMap, accountId)
Converts the provided Location FHIR object to the Health Cloud AccountAccountRelation object .
param
fhirObjis a FHIR Location object.
paramrelationRoleMapthe role relationship map.
paramaccountIdis a String with the Account Id.
return A Health Cloud ContactPoint AccountAccountRelation object.
fun getLocationOperatingHours (availableTime)
Converts the provided availableTime object to the Health Cloud Available Time Description Text.
param
atis a FHIR PractitionerRole availableTime object.
return A Health Cloud Available Time Description Text.
PractitionerFHIRTools
PractitionerFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Practitioner/PractitionerFHIRTools.dwl
Functions
fun getPractitionerResponse (acc: Object, idTypeIdList, personNames, personLanguages, fhirCodeSetQualification, qualificationIdentifiers, healthCareProviderIdentifiers, id)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
parampersonNamesis an optional array of HC PersonName objects to map.
parampersonLanguagesis a list of HC language to map.
paramfhirCodeSetQualificationis a list of Qualification CodeSet to map.
paramqualificationIdentifiersis Qualification object with identifiers.
return A FHIR formatted Practitioner object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | Account | Id | Patient account Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether this patient's record is in active use |
| name.family | PersonName | LastName | Partitioner last name |
| name.given | PersonName | FirstName | Partitioner first name |
| name.prefix | PersonName | Prefix | Parts that come after the name |
| name.suffix | PersonName | Suffix | Parts that come before the name |
| active | Account | IsActive | Whether this Patitioner's record is in active use |
| telecom.system | ContactPointPhone\ContactPointEmails | email\phone | Constant value email or phone |
| telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
| telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
| telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
| telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
| telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
| gender | Contact | Gender | The gender of the partitioner |
| birthDate | Contact | Birthdate | The date of birth of the partitioner |
| communication.coding.display | PersonLanguage | Name | A language the practitioner can use in patient communication |
| communication.text | PersonLanguage | Language | A language the practitioner can use in patient communication |
| qualification.code.coding.code | BoardCertification | CertificationType | Coded representation of the qualification |
| qualification.period.start | BoardCertification | EffectiveFrom | Start date of the period during which the qualification is valid |
| qualification.period.end | BoardCertification | EffectiveTo | End date of the period during which the qualification is valid |
| qualification.issuer | BoardCertification | BoardName | An identifier for this qualification for the practitioner |
fun getQualifications (boardCertifications, fhirCodeSetQualification, qualificationIdentifiers)
Gets the Qualifications with the provided list of Boar certifications
param
boardCertificationsis a list of HC boardCertifications to map.
paramfhirCodeSetQualificationis a list of Qualification CodeSet to map.
paramqualificationIdentifiersis Qualification object with identifiers.
return a list of Qualifications in FHIR format.
fun getCommunicationLangugaes (personLanguages)
Gets the communication languages with the provided list of person languages.
param
personLanguagesis a list of HC language to map.
return a list of communication languages in FHIR format.
fun getPractitionerNames (personNames)
Gets the Practitioner names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getPractitionerCommunicationContactPoints (cp)
Gets the Practitioner communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getPractitionerIdentifiers (idTypeMap, ids)
Gets the Practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeMapis a map of HC Ids to FHIR identifier codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getPractitionerAddresses (addresses)
Get the Practitioner addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getPractitionerContacts (contactAccounts, contactPersonNames)
Gets the Practitioner contact-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
return An array of contact FHIR objects.
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
objis an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
fun getPractitionerIdentifier (identifiers, idTypeIdList)
Gets the practitioner identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifiersis an array of HC identifier objects.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
PractitionerRequest
This module defines functions needed to convert a
FHIR Practitioner resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Practitioner/PractitionerRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPractitionerAccount (fhirObj, recordTypeId)
Converts the provided Practitioner FHIR object to the Health Cloud Account object.
param
fhirObjis a FHIR Practitioner object.
paramrecordTypeIdis a String with the record type Id to use.
return A Health Cloud Account object.
fun getBoardCertificationIdentifier (method, index, accountId, qualification, idTypeIdList)
Converts the provided Practitioner FHIR Qualification object to the Health Cloud Identifier object.
param
methodis a string with the method value.
paramindexis a index value of the BoardCertification loop.
paramaccountIdis a string with the Account Id.
paramqualificationis a FHIR qualification object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerIdentifier (method, healthcareProviderId, identifierObj, idTypeIdList)
Converts the provided Practitioner FHIR object to the Health Cloud Identifier object.
param
methodis a string with the method value.
paramaccountIdis a string with the Account Id.
paramidentifierObjis a FHIR Practitioner identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the Health Cloud Contact object.
param
fhirObjis a FHIR Practitioner object.
return A Health Cloud Contact object.
fun getPractitionerPersonName (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud PersonName object list.
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A Health Cloud PersonName object list.
fun getPractitionerContactPoint (telecom, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of Practitioner telecom objects.
paramaccountIdis a string with the Account Id.
return A Health Cloud ContactPoint object list.
fun getPractitionerContactPointAddress (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getPractitionerPersonLanguage (fhirObj, accountId)
Converts the provided Practitioner FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObjis a FHIR Practitioner object.
paramaccountIdis a string with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getPractitionerContact (fhirObj)
Converts the provided Practitioner FHIR object to the Health Cloud Contact object.
param
fhirObjis a FHIR Practitioner object.
return A Health Cloud Contact object.
fun formatName (obj)
Gets the trimmed concatenated name with the provided name object.
param
objis the name object to format.
return A formatted name string with 'First Last'.
fun getPractitionerHealthcareProvider (fhirObj, contactResp)
Converts the provided Practitioner FHIR object to the Health Cloud HealthcareProvider object.
param
fhirObjis a FHIR Practitioner object.
paramcontactRespis contactResponse Object in the previous flows
return A Health Cloud HealthcareProvider object.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
reqis a FHIR object field.
paramlookupReqis from FHIR_CodeSet__c.
return A value for the picklist field.
fun getBoardCertification (fhirObj, contactResp, upsertLookupResponse, healthcareProviderId)
Converts the provided Practitioner FHIR object to the Health Cloud BoardCertification object.
param
fhirObjis a FHIR Practitioner object.
paramcontactRespis contactResponse Object in the previous flows
paramupsertLookupResponseis FHIR Codeset lookup Object
return A Health Cloud BoardCertification object.
OrganizationFHIRTools
OrganizationFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Organization/OrganizationFHIRTools.dwl
Functions
fun getOrganizationResponse (org: Object, idTypeIdList, accountContactRelations, contactAccountIds, contactAccounts, codeSetLU)
Gets the organization response object with the provided Organization object.
param
orgis a Health Cloud Organization object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramcontactAccountsis a list of Contact accounts.
paramcontactPersonNamesis a list of contact PersonName objects.
return A FHIR formatted Organization object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | Account | Id | Account Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether the organization's record is still in active use |
| type.coding.display | Account | Type | Kind of organization |
| name | Account | Name | Name used for the organization |
| telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
| telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
| telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
| telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
| telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
| telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
| address.use | ContactPointAddresses | UsageType | The use of an address |
| address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
| address.line | ContactPointAddresses | Street | Patient's address Line |
| address.city | ContactPointAddresses | City | Patient's address city |
| address.state | ContactPointAddresses | State | Patient's address state |
| address.postalCode | ContactPointAddresses | PostalCode | Patient's address postal code |
| address.country | ContactPointAddresses | Country | Patient's address country |
| contact.purpose.coding.display | AccountContactRelation | Roles | The type of contact |
| contact.name.family | PersonName | LastName | The last name of the contact party |
| contact.name.given | PersonName | FirstName | The first name of the contact party for the patient |
| contact.name.suffix | PersonName | Suffix | Parts that come after the contact party's name |
| contact.name.prefix | PersonName | Prefix | Parts that come before the contact party's name |
| contact.name.use | PersonName | NameUsageType | Purpose of this address |
fun getCodingValue (req, lookupReq)
Gets the Coding for CodeableConcept in FHIR format with the provided list of HC request field and Lookup value from FHIRCodeSet\_c.
param
reqis HC field.
return A list of FHIR formatted coding for CodeableConcept objects.
fun getOrgContactsNames (personNames)
Gets the Organization Contacts names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getOrgContactsPurpose (accountContactRelation, codeSetLU)
Gets the Organization Account Contact Relation Roles in FHIR format with the provided list of AccountContactRelation object and lookup values.
param
accountContactRelationis a list of HC AccountContactRelation objects.
return A list of FHIR formatted purpose codeable concept.
fun getOrgIdentifiers (identifiers, idTypeIdList)
Gets the organization identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
identifieris an array of HC identifier objects.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
fun getOrgCommunicationContactPoints (contactPoints)
Gets the Organization communication contact point object for the provided contact point provided.
param
contactPointsis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getOrgContactPointAddresses (addresses)
Get the Organization addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getOrgContacts (accountContactRelations, contactAccountIds, contactAccounts, codeSetLU)
Gets the organization account-contact relations as an array of FHIR objects.
param
contactAccountsis an optional list of contact Account objects to map.
paramcontactPersonNamesis a list of contact PersonName objects.
return An array of contact FHIR objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
OrganizationRequest
This module defines functions needed to convert a
FHIR Organization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Organization/OrganizationRequest.dwl
Functions
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
reqis a FHIR object field.
paramlookupReqis from FHIR_CodeSet__c.
return A value for the picklist field.
fun getOrganizationAccount (fhirObj, codeSetLU)
Converts the provided Organization FHIR object to the Health Cloud Account object.
param
fhirObjis a FHIR Organization object.
return A Health Cloud Account object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdList)
Converts the provided Organization FHIR object to the Health Cloud Identifier object.
param
methodis a String with the HTTP method to use.
paramidentifierObjis a FHIR Organization identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getOrganizationIdentifier (method, identifierObj, idTypeIdList, accountId)
Converts the provided Organization FHIR object to the Health Cloud Identifier object.
param
methodis a String with the HTTP method to use.
paramidentifierObjis a FHIR Organization identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramaccountIdis a String with the Account Id to use.
return A Health Cloud Identifier object.
fun getOrganizationContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A Health Cloud ContactPoint Address object list.
fun getOrganizationContactPointAddress (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
paramaccountIdis a String with the Account Id to use.
return A Health Cloud ContactPoint Address object list.
fun getOrganizationContact (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A Health Cloud ContactPoint object list.
fun getOrganizationContact (method, fhirObj, accountId)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
paramaccountIdis a String with the Account Id to use.
return A Health Cloud ContactPoint object list.
fun getOrganizationContactAccount (method, contactObj, recordType)
Converts the provided Organization FHIR object to the Health Cloud Contact object.
param
methodis a String with the HTTP method to use.
paramcontactObjis a FHIR Organization contact object.
paramrecordTypeis a person account type.
return A Health Cloud Contact object.
fun getContactsPersonName (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud PersonName object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization contact object.
return A Health Cloud PersonName object list.
fun getContactsContactPointAddress (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint Address object list.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR Organization object.
return A Health Cloud ContactPoint Address object list.
fun getContactsContact (method, fhirObj)
Converts the provided Organization FHIR object to the Health Cloud ContactPoint object list.
param
methodis a String with the HTTP method to use.
paramtelecomis a list of Organization contacts telecom objects.
return A Health Cloud ContactPoint object list.
fun getAccountContactRelation (method, accountId, contactsDetails, fhirObj, codeSetLU)
Converts the provided Organization FHIR object to the Health Cloud AccountContact Relation object list.
param
methodis a String with the HTTP method to use.
paramaccountIdis Organization account Id.
paramcontactIdsis organization contacts contact Ids.
return A Health Cloud ContactPoint object list.
encounterfhirtools
encounterFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Encounter/encounterfhirtools.dwl
Functions
fun getEncounterResponse (encounterRLU)
Generates the FHIR response with the provided Encounter Object.
param
encounterRLUis the Encounter object to map.
return A Health Cloud ClientEncounter response.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | ClinicalEncounter | Id | Encounter Id |
| Identifier.use | ClinicalEncounterIdentifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | ClinicalEncounterIdentifier | SourceSystem | Identifier system for resource |
| identifier.value | ClinicalEncounterIdentifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | ClinicalEncounterIdentifier | IdTypeId | Description of identifier |
| status | ClinicalEncounter | Status | Encounter status |
| serviceType.coding.display | ClinicalEncounter | ServiceType | Specific type of service |
| class.coding.display | ClinicalEncounter | Category | Classification of patient encounter |
| type.coding.code | ClinicalEncounter.TypeId | Code | Symbol in syntax defined by the system for Encounter type |
| type.coding.display | ClinicalEncounter.TypeId | CodeDescription | Representation defined by the system |
| type.coding.system | ClinicalEncounter.TypeId | SourceSystem | Identity of the terminology system for Encounter type |
| priority.coding.code | ClinicalEncounter.PriorityId | Code | Symbol in syntax defined by the system for Encounter urgency |
| priority.coding.display | ClinicalEncounter.PriorityId | CodeDescription | Representation defined by the system |
| priority.coding.system | ClinicalEncounter.PriorityId | SourceSystem | Identity of the terminology system for Encounter urgency |
| subject | ClinicalEncounter | PatientId | The patient\group present at the encounter |
| basedOn | ClinicalEncounterSvcRequest | ClinicalServiceRequestId | The ServiceRequest that initiated this encounter |
| participant | ClinicalEncounterProvider | Not Available | List of participants involved in the encounter |
| participant.type | ClinicalEncounterProvider | PractitionerTypeId | Role of participant in encounter |
| participant.period.start | ClinicalEncounterProvider | StartDate | Start time for the encounter that the participant participated |
| participant.period.end | ClinicalEncounterProvider | EndDate | End time for the encounter that the participant participated |
| period.start | ClinicalEncounter | StartDate | Start time of the encounter |
| period.end | ClinicalEncounter | EndDate | End time of the encounter |
| length.value | ClinicalEncounter | Duration | Quantity of time the encounter lasted |
| length.unit | ClinicalEncounter | DurationUnit | Unit for the quantity of time the encounter lasted |
| reasonCode.coding.code | ClinicalEncounterReason.ReasonCodeId | Code | Symbol for coded reason the encounter takes place |
| reasonCode.coding.display | ClinicalEncounterReason.ReasonCodeId | CodeDescription | Representation defined by the system |
| reasonCode.coding.system | ClinicalEncounterReason.ReasonCodeId | SourceSystem | Identity of the terminology system for Reason |
| reasonReference | ClinicalEncounterReason | ReasonReferenceId | Reason the encounter takes place (reference) |
| serviceProvider | ClinicalEncounter | FacilityId | The organization (facility) responsible for this encounter |
| partOf | ClinicalEncounter | RelatedClinicalEncounterId | Another Encounter this encounter is part of |
| diagnosis.condition | ClinicalEncounterDiagnosis | DiagnosisId | The diagnosis or procedure relevant to the encounter |
| diagnosis.use | ClinicalEncounterDiagnosis | UsageTypeId | Role that this diagnosis has within the encounter |
| diagnosis.rank | ClinicalEncounterDiagnosis | DiagnosisRank | Ranking of the diagnosis |
| hospitalization.preAdmissionIdentifier | ClinicalEncounter | PreAdmissionIdentiferId | Pre-admission identifier |
| hospitalization.origin | ClinicalEncounter | PreviousFacilityId | The location or organization from which the patient came before admission |
| hospitalization.admitSource | ClinicalEncounter | AdmissionSource | From where patient was admitted |
| hospitalization.reAdmission | ClinicalEncounter | ReadmissionCode | The type of hospital re-admission that has occurred |
| hospitalization.dietPreference | ClinicalEncounter | DietPreference | Diet preferences reported by the patient |
| hospitalization.specialCourtesy | ClinicalEncounter | SpecialCourtesy | Special courtesies |
| hospitalization.destination | ClinicalEncounter | DestinationFacility\DestinationOrganization | Location\org to which the patient is discharged |
| hospitalization.dischargeDisposition | ClinicalEncounter | DischargeDisposition | Category or kind of location after discharge |
| location.location | ClinicalEncounterFacility | FacilityId | Location the encounter takes place |
| location.status | ClinicalEncounterFacility | Status | The status of the location. |
| location.physicalType | ClinicalEncounterFacility | FacilityTypeId | The physical type of the location |
| location.period.start | ClinicalEncounterFacility | StartDate | Start time during which the patient was present at the location |
| location.period.end | ClinicalEncounterFacility | EndDate | End time during which the patient was present at the location |
fun getDiagnosis (encounter)
Creates a list of Diagnosis references with the provided Encounter object.
param
encounteris the Encounter object containing Diagnosis.
return A list of Diagnosis references.
fun getLocation (encounter)
Creates a list of location references with the provided Encounter object.
param
encounteris the Encounter object containing locations.
return A list of location references.
fun getParticipant (participant)
Gets the Participant in FHIR format with the provided ClinicalEncounterProvider objects.
param
participantis a list of HC ClinicalEncounterProvider objects.
return A list of FHIR formatted participant response.
fun getReasonCode (ReasonCodeIdCodeSetBundle)
Gets the reasonCode in FHIR format with the provided ClinicalEncounterReason objects.
param
ReasonCodeIdCodeSetBundleis a list of HC CodeSetBundle objects related to reasonCode.
return A list of FHIR formatted reasonCode response.
fun getHospitalization (encounter)
Gets the hospitalization related data in FHIR format with the provided encounter objects.
param
encounteris the ClinicalEncounterReason object.
return A list of FHIR formatted hospitalization response.
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
return A string with the entry URL.
encounterRequest
This module defines functions needed to convert a
FHIR Encounter resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Encounter/encounterRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
reqis a FHIR object field.
paramlookupReqis from FHIR_CodeSet__c.
return A value for the picklist field.
fun getEncounterUpsert (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the Health Cloud Encounter object.
param
fhirObjis a FHIR Encounter object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Encounter object
paramcreateis a boolean with true for a create and false for an update.
return Health Cloud Encounter upsert fields.
fun getEncounterUpdate (fhirObj, codeSetBundleList, create)
Converts the provided Encounter FHIR object to the Health Cloud Encounter object.
param
fhirObjis a FHIR Encounter object.
paramcodeSetBundleListis the list of CodeSetBundle objects for the Encounter object
paramcreateis a boolean with true for a create and false for an update.
return Health Cloud Encounter update fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Encounter FHIR object to the Health Cloud CodeSet object.
param
codeSetListis the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Encounter FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetListis the list of CodeSetBundle object.
parambundleTypeis for defining the CodeSetBundle type.
paramnameis for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, encounterId, typeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterIdentifier object.
param
identifieris the list of ClinicalEncounterIdentifier object.
paramencounterIdis the associated encounter Id.
paramtypeIdis a String with the Id type Id to set.
return Health Cloud ClinicalEncounterIdentifier upsert fields.
fun getEncounterPreAdmissionUpsert (preAdmissionId)
Adds the Encounter PreAdmissionIdentifier to the Health Cloud ClinicalEncounter object.
param
preAdmissionIdis the PreAdmissionIdentifier Id.
return Health Cloud ClinicalEncounter upsert fields.
fun getParticipantUpsert (participant, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterProvider object.
param
participantis the list of ClinicalEncounterProvider object.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterProvider upsert fields.
fun getLocationUpsert (location, encounterId, typeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterFacility object.
param
locationis the list of ClinicalEncounterFacility object.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterFacility upsert fields.
fun getReasonCodeUpsert (reasonCode, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterReason object.
param
reasonCodeis the list of ClinicalEncounterReason object.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterReason upsert fields.
fun getDiagnosisUpsert (diagnosis, encounterId, useCodeId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterDiagnosis object.
param
diagnosisis the list of ClinicalEncounterDiagnosis object.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterDiagnosis upsert fields.
fun getEncounterSvcRequestUpsert (svcRequest, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterSvcRequest object.
param
svcRequestis the reference to ClinicalServiceRequest that this encounter is based on.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterSvcRequest upsert fields.
fun getEncounterReasonRefUpsert (reasonReference, encounterId)
Converts the provided Encounter FHIR object to the Health Cloud ClinicalEncounterReason object.
param
reasonReferenceis the Reason Reference for ClinicalEncounterReason object.
paramencounterIdis the associated encounter Id.
return Health Cloud ClinicalEncounterReason upsert fields.
PractitionerRoleFHIRTools
PractitionerRoleFHIRTools DataWeave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleFHIRTools.dwl
Functions
fun getPractitionerRoleResponse (prole: Object, careProviderFacilitySpecialty, fhirCodeSetCode, practitioner, specialty, location, idTypeIdList, operatingHours, organization)
Generates the practitionerrole response object in FHIR format with the provided practitionerrole object queried from Health Cloud.
param
proleis the PractitionerRole object to map.
paramcareProviderFacilitySpecialtyis the care provider
paramfhirCodeSetCodeis a CodeSet Lookup for code object inside the careProviderFacilitySpecialty table to map. facility specialty.
parampractitioneris a Practitioner object to map.
paramspecialtyis a Specialty object to map.
paramlocationis a Location object to map.
paramidTypeMapis a map with the Id type Ids to use.
paramoperatingHoursis a OperatingHours object to map.
paramorganizationis a Organization object to map.
return A FHIR formatted PractitionerRole object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | Account | Id | Patient account Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether this patient's record is in active use |
| .start | HealthcarePractitionerFacility | EffectiveFrom | The start date of the during which the practitioner is authorized to perform in these role(s) |
| .end | HealthcarePractitionerFacility | EffectiveTo | The end date of the during which the practitioner is authorized to perform in these role(s) |
| practitioner.reference | HealthcarePractitionerFacility | PractitionerId | Practitioner that is able to provide the defined services for the organization |
| practitioner.display | HealthcarePractitionerFacility | Name | Practitioner that is able to provide the defined services for the organization |
| code.coding.code | CareProviderFacilitySpecialty | SpecialtyRole | Roles which this practitioner may perform |
| code.coding.display | CareProviderFacilitySpecialty | Name | Roles which this practitioner may perform |
| specialty.coding.code | CareProviderFacilitySpecialty | SepcialtyId | Specific specialty of the practitioner |
| specialty.coding.code | CareProviderFacilitySpecialty | CareSpecialty.Name | Specific specialty of the practitioner |
| location.reference | HealthcarePractitionerFacility | HealthcareFacilityId | Organization where the roles are available. |
| location.display | HealthcarePractitionerFacility | HealthcareFacility.Name | Organization where the roles are available. |
| organization (Reference) | Organization where the roles are available. | ||
| availabilityExceptions | HealthcarePractitionerFacility | AvailabilityExceptions | Description of availability exceptions |
| availableTime | OperatingHoursId | OperatingHours | Times the Service Site is available |
fun getIdentifier (prole, idTypeIdList)
Gets the practitionerrole identifiers and returns a list of FHIR Identifier objects.
param
prolean array of HC Identifier objects.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return An array of FHIR Identifier objects.
fun getPractitioner (prole: Object, practitioner)
Gets the practitioner object with the provided practitionerrole object and returns null if not found.
param
proleis the PractitionerRole object to map.
parampractitioneris a Practitioner object.
return A FHIR formatted Practitioner object.
fun getLocation (prole: Object, location)
Gets the location object with the provided practitionerrole object and returns null if not found.
param
proleis the PractitionerRole object to map.
paramlocationis an array of HC Location objects.
return An array of FHIR formatted Location objects.
fun getOrganization (prole: Object, organization)
Gets the organization object with the provided practitionerrole object and returns null if not found.
param
proleis the PractitionerRole object to map.
paramorganizationis an array of HC Organization objects.
return An array of FHIR formatted Organization objects.
fun getCode (careProviderFacilitySpecialty, fhirCodeSetCode)
Gets the code object with the provided practitionerrole object and returns null if not found.
param
careProviderFacilitySpecialtyis an array of HC Code objects.
paramfhirCodeSetCodeis a list of codeset lookup for Code to map.
return An array of FHIR formatted Code objects.
fun getspecialty (specialty)
Gets the specialty object with the provided practitionerrole object and returns null if not found.
param
specialtyis an array of HC Specialty objects.
return An array of FHIR formatted Specialty objects.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
PractitionerRoleRequest
This module defines functions needed to convert a
FHIR PractitionerRole resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/PractitionerRole/PractitionerRoleRequest.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
resis a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
reqis a FHIR object field.
paramlookupReqis from FHIR_CodeSet__c.
return A value for the picklist field.
fun getPractitionerRoleAccount (fhirObj, operatingHoursId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
fhirObjis a FHIR PractitionerRole healthcarePractitionerFacility object.
return A Health Cloud HealthcarePractitionerFacility object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdList)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR PractitionerRole identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getPractitionerRoleIdentifier (method, fhirObj, idTypeIdList, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
methodis a String with the HTTP method to use.
paramfhirObjis a FHIR PractitionerRole identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramhealthcareFacilityIdis a String with the HealthcareFacility Id.
return An object with a list of Health Cloud Identifier objects.
fun getCareProviderFacilitySpecialty (method, fhirObj, upsertLookupResponse)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
fhirObjis a FHIR PractitionerRole careProviderFacilitySpecialty object.
return A Health Cloud CareProviderFacilitySpecialty object.
fun getCareProviderFacilitySpecialty (method, fhirObj, upsertLookupResponse, healthcareFacilityId)
Converts the provided PractitionerRole FHIR object to the Health Cloud PractitionerRole object.
param
methodis a String with the method to use.
paramfhirObjis a FHIR PractitionerRole careProviderFacilitySpecialty object.
paramupsertLookupResponseis a FHIRCodeSet\_c object.
paramhealthcareFacilityIdis a String with the HealthcareFacility Id.
return An object with a list of Health Cloud CareProviderFacilitySpecialty objects.
fun getAvilableTime (availableTime)
Converts the provided availableTime object to the Health Cloud Available Time Description Text.
param
availableTimeis a FHIR PractitionerRole availableTime object.
return A Health Cloud Available Time Description Text.
fun getHealthcareFacility (method, fhirObj)
Converts the provided PractitionerRole FHIR object to the Health Cloud HealthcareFacility object.
param
methodis a String with the method to use.
paramfhirObjis a FHIR PractitionerRole object.
return An object with a list of Health Cloud HealthcareFacility objects.
RelatedPersonFHIRTools
RelatedPersonFHIRTools dataweave library contains functions
used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonFHIRTools.dwl
Functions
fun getRelatedPersonResponse (acc: Object, contactAccountIds, contactContactRelations, relationRoleMap, upsertLookupResponse, idTypeIdList)
Generates the FHIR response with the provided Account and contact Accounts.
param
accis the Account object to map.
parampersonNamesis an optional array of HC PersonName objects to map.
parampersonLanguagesis a list of person languages to map.
paramcontactAccountIdsis a list of contact account Ids to use a references.
paramcontactContactRelationsis a list of contact relations to map.
paramrelationRoleMapis a map of relation roles to use.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A FHIR formatted RelatedPerson object.
| FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
|---|---|---|---|
| id | Account | Id | RelatedOerson account Id |
| Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
| identifier.system | Identifier | SourceSystem | Identifier system for resource |
| identifier.value | Identifier | IdValue | Identifier value for resource |
| identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
| active | Account | IsActive | Whether this related person's record is in active use |
| patient.reference | ContactContactRelation__c | HealthCloudGA__Contact__c | The patient this person is related to |
| period.start | ContactContactRelation__c | HealthCloudGA__StartDate__c | Start time that this relationship is considered |
| period.end | ContactContactRelation__c | HealthCloudGA__EndDate__c | End time that this relationship is considered valid |
| relationship.system | ContactContactRelation__c | Constant relationshipSystem | |
| relationship.code | ContactContactRelation__c | HealthCloudGA__Role__c | Lookup using function getRelatedPersonRelationRole |
| name.family | PersonName | LastName | RelatedPerson family name |
| name.given | PersonName | FirstName | RelatedPerson given name |
| name.use | PersonName | NameUsageType | The use of a RelatedPerson name |
| name.prefix | PersonName | Prefix | Parts that come before the name |
| name.suffix | PersonName | Suffix | Parts that come after the name |
| gender | Contact | Gender | The gender of a person used for administrative purposes |
| birthDate | Contact | Birthdate | The date on which the related person was born |
| telecom.system | ContactPointPhone\ContactPointEmails | Constant value email\phone | |
| telecom.value | ContactPointPhone\ContactPointEmails | TelephoneNumber\EmailAddress | The actual contact point details |
| telecom.use | ContactPointPhone\ContactPointEmails | UsageType | Use of contact point |
| telecom.rank | ContactPointPhone\ContactPointEmails | PreferenceRank | Specify preferred order of use |
| telecom.period.start | ContactPointPhone\ContactPointEmails | ActiveFromDate | Starting time with inclusive boundary |
| telecom.period.end | ContactPointPhone\ContactPointEmails | ActiveToDate | End time with inclusive boundary |
| address.use | ContactPointAddresses | UsageType | The use of an address |
| address.type | ContactPointAddresses | AddressType | The type of an address (physical\postal) |
| address.line | ContactPointAddresses | Street | RelatedPerson's Address Line |
| address.city | ContactPointAddresses | City | RelatedPerson's Address City |
| address.state | ContactPointAddresses | State | RelatedPerson's Address State |
| address.postalCode | ContactPointAddresses | PostalCode | RelatedPerson's Address Postal Code |
| address.country | ContactPointAddresses | Country | RelatedPerson's Address Country |
| communication.language.coding.code | PersonLanguage | System__c | Language terminology system |
| communication.language.coding.code | PersonLanguage | Code__c | Language code |
| communication.language.coding.code | PersonLanguage | Display__c | Language display |
| communication.preferred | PersonLanguage | Rank | Language preference indicator |
fun getRelatedPersonNames (personNames)
Gets the RelatedPerson names in FHIR format with the provided list of HC PersonName objects.
param
personNamesis a list of HC PersonName objects.
return A list of FHIR formatted name objects.
fun getRelatedPersonCommunicationContactPoints (cp)
Gets the RelatedPerson communication contact point object for the provided contact point provided.
param
cpis a HC ContactPointEmail or ContactPointPhone object to map.
return An array of FHIR ContactPoint object.
fun getRelatedPersonIdentifiers (ids, idTypeIdList)
Gets the RelatedPerson identifiers with the provided HC ID array and returns a list of FHIR Identifier objects.
param
idTypeIdListis a list of HC records to FHIR identifier type codes.
paramidsis an array of HC identifier objects.
return An array of FHIR Identifier objects.
fun getRelatedPersonAddresses (addresses)
Get the RelatedPerson addresses form HC and returns an array of FHIR formatted Address objects.
param
addressesis an array of HC addresses.
return An array of FHIR formatted Address objects.
fun getCommunicationLangugaes (personLanguages, languagelookup)
Maps the communication languages with the provided list of person languages.
param
personLanguagesis a list of languages to map.
paramlanguagelookupis FHIR Codeset lookup object.
return a FHIR formatted list of communication languages.
fun getLinkSelf (attr: Object)
Gets the URL to the current web resource.
param
attris an object with the attributes.
return A string with the self link.
fun getEntryUrl (item: Object, attr: Object)
Gets the URL for the entry provided.
param
itemis an object with the item that's being returned.
paramattris an object with the attributes.
return A string with the entry URL.
fun getRelatedPersonRelationRole (contactContactRelation, id, relationRoleMap)
Gets the relatedperson relation role code with the provided list of contact relations, the Id of the current account, and the relation role map.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
paramrelationRoleMapthe role relationship map.
return A code for the relatedperson relation role.
fun getRelatedPersonRelationRoleRecord (contactContactRelation, id)
Gets the relatedperson relation role record with the provided list of contact relations and the Id.
param
contactContactRelationsis a list of contact relation objects.
paramidis a string with the account Id.
return A Salesforce role Id for the provided data.
RelatedPersonRequest
This module defines functions needed to convert a
FHIR RelatedPerson resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/relatedperson/RelatedPersonRequest.dwl
Functions
fun getRelatedPersonAccount (fhirObj, recordTypeId)
Converts the provided RelatedPerson FHIR object to the Health Cloud Account object.
param
fhirObjis a FHIR RelatedPerson object.
paramrecordTypeIdis a String with the record type Id to set.
return A Health Cloud Account object.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud Contact object.
param
fhirObjis a FHIR RelatedPerson object.
return A Health Cloud Contact object.
fun getRelatedPersonPersonName (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonName object list.
param
fhirObjis a FHIR RelatedPerson object.
return A Health Cloud PersonName object list.
fun getRelatedPersonPersonName (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonName object list.
param
fhirObjis a FHIR RelatedPerson object.
paramaccountIdis a String with the Account Id.
return A Health Cloud PersonName object list.
fun getRelatedPersonContactPoint (telecom)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of RelatedPerson telecom objects.
return A Health Cloud ContactPoint object list.
fun getRelatedPersonContactPoint (telecom, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint object list.
param
telecomis a list of RelatedPerson telecom objects.
paramaccountIdis a String with the Account Id.
return A Health Cloud ContactPoint object list.
fun getRelatedPersonContactPointAddress (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObjis a FHIR RelatedPerson object.
return A Health Cloud ContactPoint Address object list.
fun getRelatedPersonContactPointAddress (fhirObj, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud ContactPoint Address object list .
param
fhirObjis a FHIR RelatedPerson object.
paramaccountIdis a String with the Account Id.
return A Health Cloud ContactPoint Address object list.
fun getRelatedPersonPersonLanguage (fhirObj, upsertLookupResponse)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObjis a FHIR RelatedPerson object.
return A Health Cloud PersonLanguage object list.
fun getRelatedPersonPersonLanguage (fhirObj, upsertLookupResponse, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud PersonLanguage object list.
param
fhirObjis a FHIR RelatedPerson object.
paramupsertLookupResponseis a FHIR Codeset lookup object.
paramaccountIdis a String with the Account Id.
return A Health Cloud PersonLanguage object list.
fun getRelatedPersonContact (fhirObj)
Converts the provided RelatedPerson FHIR object to the Health Cloud Contact object.
param
fhirObjis a FHIR Patient object.
return A Health Cloud Contact object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdList)
Converts the provided RelatedPerson FHIR object to the Health Cloud Identifier object.
param
methodis a string with the method to use.
paramidentifierObjis a FHIR Patient identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
return A Health Cloud Identifier object.
fun getRelatedPersonIdentifier (method, identifierObj, idTypeIdList, accountId)
Converts the provided RelatedPerson FHIR object to the Health Cloud Identifier object.
param
methodis a string with the method to use.
paramidentifierObjis a FHIR Patient identifier object.
paramidTypeIdListis a list of HC records to FHIR identifier type codes.
paramaccountIdis a string with the Account Id.
return A Health Cloud Identifier object.
fun getRelatedPersontContactsRelationships (method, fhirObj, relationRoleMap, mainContactId, contactId)
Converts the provided Contact FHIR object to the Health Cloud RelatedPerson contact-to-contact relationship of composite request.
param
methodis a string with POST or PATCH.
paramfhirObjis a FHIR Contact object.
paramrelationRoleMapthe role relationship map.
parammainContactIdis a string with the main Contact Id.
paramcontactIdis a string with the Contact Id.
return A composite Health Cloud contact-to-contact relationship request.
Util
A library with needed dataweave utility functions.
Source:
.src/main/resources/dwl/Util.dwl
Functions
fun clean (obj: Object)
Cleans the provided object of blank strings, null values, empty objects, and empty arrays.
param
objis an Object to clean.
return A cleaned object.
fun clean (arr: Array)
Cleans the provided array of blank strings, null values, empty objects, and empty arrays.
param
arris an Array to clean.
return A cleaned Array.
fun removeNull (arr: Array)
Removes all null items from an array.
param
arris an array.
return An array with null items removed.
fun removeNull (obj: Object)
Removes all null values from an object.
param
objis an object.
return An object with null values removed.
fun getDateOfWeek (dateOfWeek)
Converts the DateOfWeek code to DateOfWeek.
param
dateOfWeekCodeis an code.
return An object with null values removed.